from pydantic import BaseModel, Field, root_validator


class RegisterMallModel(BaseModel):

    name: str = Field(..., max_length=16, description="商城名字")
    description: str = Field(None, description="商城描述", max_length=255)
    icon: str = Field(None, description="商城图标", max_length=128)
    code: str = Field(None)


class UpdateMallModel(BaseModel):
    description: str = Field(None, description="商城描述", max_length=255)
    icon: str = Field(None, description="商城图标", max_length=128)
